/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package physical_spaces.beans;

import java.sql.Connection;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import logical_spaces.business.TableSpaceBusiness;
import physical_spaces.business.CreateDataFileBusiness;

/**
 *
 * @author juan
 */
@ManagedBean
@ViewScoped
public class CreateDataFileBean {

    String tableSpaceName;
    String dataFileName;
    String size;
    boolean automaticExtend=true;
    String autoextend="10";
    String max = "1000";

    public String getTableSpaceName() {
        return tableSpaceName;
    }

    public void setTableSpaceName(String tableSpaceName) {
        this.tableSpaceName = tableSpaceName;
    }

    public String getDataFileName() {
        return dataFileName;
    }

    public void setDataFileName(String dataFileName) {
        this.dataFileName = dataFileName;
    }

    public boolean isAutomaticExtend() {
        return automaticExtend;
    }

    public void setAutomaticExtend(boolean automaticExtend) {
        this.automaticExtend = automaticExtend;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getAutoextend() {
        return autoextend;
    }

    public void setAutoextend(String autoextend) {
        this.autoextend = autoextend;
    }

    public String getMax() {
        return max;
    }

    public void setMax(String max) {
        this.max = max;
    }

    public void createDataFile( Connection conn ) {

        CreateDataFileBusiness createDataFileBusiness = new CreateDataFileBusiness(tableSpaceName, dataFileName, size, automaticExtend, autoextend, max);
        createDataFileBusiness.createDataFile( conn );
    }


    
      
    
        
    
    
}
